package com.hxb.example.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class LoginController {

    @PostMapping("/login")
    public Object login(){
        return "登陆成功!";
    }
    public int[] findMissingAndRepeatedValues(int[][] grid) {
        byte[] bytes = new byte[grid.length * grid[0].length];
        int a = 0;
        for (int[] in : grid) {
            for (int m : in) {
                if (bytes[m] == 1) {
                    a = m;
                } else {
                    bytes[m] = 1;
                }
            }
        }
        int b = 0;
        for (int i = 0; i< bytes.length; i++) {
            if (bytes[i] == 0) {
                b = i;
                break;
            }
        }
        return new int[]{a, b};
    }
}
